package com.caifeng.domain;

import lombok.Getter;

@Getter
public enum ResponseCode {

    SUCCESS(10200, "success"),

    FAIL(10201, "fail"),

    TRY_AGAIN(10202, "服务器繁忙，请重试"),

    TOKEN_INVALIDATION(10203, "令牌失效"),

    INSUFFICIENT_PERMISSIONS(10204, "权限不足"),

    NOT_LOGIN(10205, "未登录"),

    PARAM_ERROR(10206, "参数错误"),

    CAPTCHA_ERROR(10207, "验证码错误"),

    SERVICE_ERROR(50000, "服务器异常"),

    RESPONSE_FORMAT_ERROR(50001, "响应格式错误"),

    DB_ERROR(50002, "数据库异常");

    private final int code;
    private final String msg;
    ResponseCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}